/*
 * Copyright 2020-2021 redragon.dongbin
 *
 * This file is part of redragon-erp/赤龙ERP.

 * redragon-erp/赤龙ERP is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.

 * redragon-erp/赤龙ERP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with redragon-erp/赤龙ERP.  If not, see <https://www.gnu.org/licenses/>.
 */
package com.erp.ledger.balance.dao;

import java.util.List;

import org.redragon.framework.hibernate.DaoCRUDIF;
import com.erp.ledger.balance.dao.model.GLBalance;
import com.erp.ledger.balance.dao.model.GLBalanceCO;

public interface GLBalanceDao extends DaoCRUDIF<GLBalance, GLBalanceCO>{
    
    //判断平衡表是否存在真实数据
    public abstract int getGLBalanceNumForActual(String ledgerCode);
    
    //判断是否存在科目期初数据
    public abstract boolean isExistBeginBalanceForSubject(String ledgerCode, String subjectCode);
 
    //更新期数数据的状态
    public abstract void updateBeginBalanceStatus(String ledgerCode, String status);
    
    //根据科目获取科目余额表中的最后一行
    public abstract GLBalance getLastGLBalanceBySubject(String ledgerCode, String subjectCode);
    
    //根据科目获取平衡表数据
    public abstract List<GLBalance> getGLBalanceListBySubject(String ledgerCode, String periodName, String subjectCode);
}